]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
cleanup: Switch some method calls to new indentation style
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 12 Sep 2019 22:41:47 +0000 (00:41 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Sun, 15 Sep 2019 13:30:19 +0000 (13:30 +0000)
The legacy indent rule currently ignores arrow functions in parameters
to allow callbacks to not align with the other arguments:

    this._someFunctionWithFairlyLongishName(arg1, arg2, arg3,
        () => {
            this._someOtherFunctionWithLongName(arg1);
        });

But as ignoring entire nodes means we can end up with arbitrary
indentation, we should drop the exception. While this would make
the above "illegal" under the legacy config, it conforms with the
non-legacy style, so everything should be fine ...

... except that eslint starts to complain about some function args
that should be fine under the legacy config. Maybe it's thrown off
by the function-arg-in-arrow-function-in-function-arg structure, but
rather than figuring it out, let's just move those to the new style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725

js/ui/screenshot.js
js/ui/status/accessibility.js

index c9ede2fc1d0acb1256856b661320d52841f24f79..33233db90defbf1f205bf08a94d2cfa159ad0465 100644 (file)
@@ -116,8 +116,8 @@ var ScreenshotService = class {
                 try {
                     let [result, area, filenameUsed] =
                         screenshot.screenshot_area_finish(res);
-                    this._onScreenshotComplete(result, area, filenameUsed,
-                                               flash, invocation);
+                    this._onScreenshotComplete(
+                        result, area, filenameUsed, flash, invocation);
                 } catch (e) {
                     invocation.return_gerror (e);
                 }
@@ -134,8 +134,8 @@ var ScreenshotService = class {
                 try {
                     let [result, area, filenameUsed] =
                         screenshot.screenshot_window_finish(res);
-                    this._onScreenshotComplete(result, area, filenameUsed,
-                                               flash, invocation);
+                    this._onScreenshotComplete(
+                        result, area, filenameUsed, flash, invocation);
                 } catch (e) {
                     invocation.return_gerror (e);
                 }
@@ -152,8 +152,8 @@ var ScreenshotService = class {
                 try {
                     let [result, area, filenameUsed] =
                         screenshot.screenshot_finish(res);
-                    this._onScreenshotComplete(result, area, filenameUsed,
-                                               flash, invocation);
+                    this._onScreenshotComplete(
+                        result, area, filenameUsed, flash, invocation);
                 } catch (e) {
                     invocation.return_gerror (e);
                 }
index 56d7802b3fef5dc2baee5a25e85753d0ad365ba8..0423fd510b08ecce69df63887aed09935eda403c 100644 (file)
@@ -179,8 +179,8 @@ class ATIndicator extends PanelMenu.Button {
             settings.is_writable(KEY_TEXT_SCALING_FACTOR),
             enabled => {
                 if (enabled)
-                    settings.set_double(KEY_TEXT_SCALING_FACTOR,
-                                        DPI_FACTOR_LARGE);
+                    settings.set_double(
+                        KEY_TEXT_SCALING_FACTOR, DPI_FACTOR_LARGE);
                 else
                     settings.reset(KEY_TEXT_SCALING_FACTOR);
             });